export default {
    component: 'jzlImage',
    icon: 'fa fa-image',
    name: '图片',

    ele_style: {
        _name: '图片Image',
        _render: '_ele',
        _node: "div",
        _ss: {
            theme: "ele-img"
        },
        _sort: [ 'image', 'text' ],

        image: {
            _name: '图片',
            _render: '_image',
            _node: 'img',
            _value: 'model.image',
            _ss: {
                theme: "ele-img"
            },
            _sh: {},
            _rh: false
        },
        text: {
            _name: '图片文字',
            _render: '_text',
            _node: 'div',
            _ss: {
                theme: "ele-img-txt"
            },
            _sh: {},
            _rh: false,
            _sort: [ 'title', 'remark' ],

            title: {
                _name: '标题',
                _render: '_title',
                _node: 'text',
                _value: 'model.title',
                _ss: {
                    theme: "ele-img-name"
                },
                _sh: {},
                _rh: false
            },
            remark: {
                _name: '描述',
                _render: '_remark',
                _node: 'text',
                _value: 'model.remark',
                _ss: {
                    theme: "ele-img-desc"
                },
                _sh: {},
                _rh: false
            }
        }
    },
    setting: {
        sticky: false
    },
    vars: [{
        prop: "model",
        type: "json",
        default: null,
        force: true,
        initType: "static",
        // initPath: "",
        // varName: "",    // page var name
        // emptyDefault: true,
        // api: null,
        // mbCode: null,
        // formCode: null,
        // viewCode: null,
        // itemName: null,
        // apiFilter: {},
        // mapiFilter: {}

        defaultJson: {
            image: '/assets/images/bg.png',
            title: '图片标题',
            remark: '图片描述'
        }
    }],
    data_fieldsmap: {

    },
    data_schema: {       // 组件需要的字段
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "数据",
        "description": "image description",
        "type": "object",
        "properties": {
            "image": {
                "title": "图片",
                "type": "string",
                "ui:options": {
                    'widget': 'FilePicker'
                }
            },
            "title": {
                "title": "标题",
                "type": "string"
            },
            "remark": {
                "title": "描述",
                "type": "string",
                "ui:options": {
                    'widget': 'TinymceEditor'
                }
            }
        }
    },
    data_type: 'static',    // static | dync
    data_dync: {},
    data_static: {
        image: '/assets/images/bg.png',
        title: '图片标题',
        remark: '图片描述'
    }
}
